package com.cdu.pojo.dto;

import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;

@Data
public class ProductUpdateDTO {
    @NotNull(message = "商品ID不能为空")
    private Integer id;

    @NotBlank(message = "商品标题不能为空")
    private String title;

    private String sellPoint;  // 商品卖点可以为空

    @NotNull(message = "商品价格不能为空")
    @Min(value = 0, message = "商品价格必须大于0")
    private Integer price;

    @NotNull(message = "商品库存不能为空")
    @Min(value = 0, message = "商品库存必须大于0")
    private Integer num;

    private String image;      // 商品图片可以为空

    private Integer priority;  // 显示优先级可以为空
}